const connection = require('../../db/index')
const express = require("express");
const addBook = express.Router();
//计算机添加数据
//计算机 添加
addBook.post('/addbook',(req,res) => {
    connection.query('insert into jisuanji value(null,"'+req.body.name+'","'+req.body.author+'",'+req.body.num+')', function(err, rows, fields) {
        if (err) {
            throw err
        }
        res.send({
            status:201
        })
    })
})

module.exports = addBook